//
//  UIDevice+SZDevice.m
//  HX2Car
//
//  Created by Mudmen on 2019/11/25.
//  Copyright © 2019 Hx2car_mac. All rights reserved.
//

#import "UIDevice+SZDevice.h"

@implementation UIDevice (SZDevice)

+ (void)switchNewOrientation:(UIInterfaceOrientation)interfaceOrientation
{
        
        NSNumber *resetOrientationTarget = [NSNumber numberWithInt:UIInterfaceOrientationUnknown];
        
        [[UIDevice currentDevice] setValue:resetOrientationTarget forKey:@"orientation"];

        NSNumber *orientationTarget = [NSNumber numberWithInteger:interfaceOrientation];
        
        [[UIDevice currentDevice] setValue:orientationTarget forKey:@"orientation"];
    
}


@end
